package jp.idahopotato.bean;

import android.os.Parcel;
import android.os.Parcelable;


/**
 * 検索条件に一致した結果を保存するための構造体
 * @author hiroki
 *
 */
public class Result implements Parcelable{

	/**
	 * 結果名
	 */
	private String result_name = "";

	/**
	 * 防具名の格納
	 */
	private String head = "";
	private String body = "";
	private String arm = "";
	private String west = "";
	private String leg = "";

	/**
	 * 装飾品の格納
	 */
	private String[] jewels = {""};

	/**
	 * 発動スキル一覧
	 */
	private String[] skills = {""};
	/**
	 * スキルポイント一覧
	 */
	private int[] skills_point = {0};

	/**
	 *
	 * @param result_name
	 */
	public void setResultName(String result_name) {
		this.result_name = result_name;
	}

	/**
	 *
	 * @return result_name
	 */
	public String getResultName() {
		return result_name;
	}

	/**
	 *
	 * @param head
	 */
	public void setHead(String head) {
		this.head = head;
	}
	/**
	 *
	 * @return head
	 */
	public String getHead() {
		return head;
	}
	/**
	 *
	 * @param body
	 */
	public void setBody(String body) {
		this.body = body;
	}
	/**
	 *
	 * @return body
	 */
	public String getBody() {
		return body;
	}
	/**
	 *
	 * @param arm
	 */
	public void setArm(String arm) {
		this.arm = arm;
	}
	/**
	 *
	 * @return arm
	 */
	public String getArm() {
		return arm;
	}
	/**
	 *
	 * @param west
	 */
	public void setWest(String west) {
		this.west = west;
	}
	/**
	 *
	 * @return west
	 */
	public String getWest() {
		return west;
	}
	/**
	 *
	 * @param leg
	 */
	public void setLeg(String leg) {
		this.leg = leg;
	}
	/**
	 *
	 * @return leg
	 */
	public String getLeg() {
		return leg;
	}
	/**
	 *
	 * @param jewels
	 */
	public void setJewels(String[] jewels) {
		this.jewels = jewels;
	}
	/**
	 *
	 * @return jewels
	 */
	public String[] getJewels() {
		return jewels;
	}
	/**
	 *
	 * @param skills
	 */
	public void setSkills(String[] skills) {
		this.skills = skills;
	}
	/**
	 *
	 * @return skills
	 */
	public String[] getSkills() {
		return skills;
	}
	/**
	 *
	 * @param skills_point
	 */
	public void setSkillsPoint(int[] skills_point) {
		this.skills_point = skills_point;
	}
	/**
	 *
	 * @return skills_point
	 */
	public int[] getSkillsPoint() {
		return skills_point;
	}

	/**
	 * コンストラクタ
	 */
	public Result(){
	}

	/**
	 * 受け渡し用コンストラクタ?
	 */
	private Result(Parcel in) {
		readFromParcel(in);
	}

	public int describeContents() {
		return 0;
	}

	public void writeToParcel(Parcel out, int flags) {
		out.writeString(result_name);
		out.writeString(head);
		out.writeString(body);
		out.writeString(arm);
		out.writeString(west);
		out.writeString(leg);

		out.writeStringArray(jewels);
		out.writeStringArray(skills);
		out.writeIntArray(skills_point);
	}

	public void readFromParcel(Parcel in){
		result_name = in.readString();
		head = in.readString();
		body = in.readString();
		arm = in.readString();
		west = in.readString();
		leg = in.readString();

		in.readStringArray(jewels);
		in.readStringArray(skills);
		in.readIntArray(skills_point);
	}

	public static final Parcelable.Creator<Result> CREATOR =
		new Parcelable.Creator<Result>() {
		public Result createFromParcel(Parcel in) {
			return new Result(in);
		}

		public Result[] newArray(int size) {
			return new Result[size];
		}
	};
}
